package com.tucue.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.servlet.http.HttpServletRequest;

@Controller
@RequestMapping("/")
public class MainController extends BaseController{
    //杨俊生用的打开测试页面方法
    @RequestMapping("/open")
    public String myOpen() {
        return "appUserProtocol";
    }

    //默认开启登陆页面
    @RequestMapping(method = RequestMethod.GET)
    public String index(ModelMap model) {
        model.addAttribute("message", "Hello world0!");
        return "login";
    }

    @RequestMapping(value="parkConsulting",method = RequestMethod.GET)
    public String parkNews(ModelMap model) {
        model.addAttribute("message", "Hello world0!");
        return "parkQueryNews";
    }

    @RequestMapping(value="parkNewConsulting",method = RequestMethod.GET)
    public String parkAddNews(ModelMap model) {
        model.addAttribute("message", "Hello world0!");
        return "parkAddNews";
    }

    @RequestMapping(value="hello2")
    public String printWelcome2(ModelMap model) {
        model.addAttribute("hello", "Hello2 ");
        model.addAttribute("name", "john!");
        return "hello2";
    }
}